# -*- coding: utf-8 -*-
# @Time : 2022/4/9 23:17
# @Author : Liuqing
# @File : 29_if...else...列表操作.py
# @Software : PyCharm
lst = list(range(1, 20))
print("只有偶数平方：", [i**2 if i % 2 == 0 else i for i in lst])

print("所有数都平方：", [i**2 for i in lst])
